package com.xxx.kjds.serviceImpl;


import com.xxx.kjds.entity.Parameter;
import com.xxx.kjds.entity.ParameterExample;
import com.xxx.kjds.mapper.ParameterMapper;
import com.xxx.kjds.service.ParameterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ParameterServiceImpl implements ParameterService {

    @Autowired
    private ParameterMapper parameterMapper;

    @Override
    public long countByExample(ParameterExample example) {
        return parameterMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(ParameterExample example) {
        return parameterMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return parameterMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Parameter record) {
        return parameterMapper.insert(record);
    }

    @Override
    public int insertSelective(Parameter record) {
        return parameterMapper.insertSelective(record);
    }

    @Override
    public List<Parameter> selectByExample(ParameterExample example) {
        return parameterMapper.selectByExample(example);
    }

    @Override
    public Parameter selectByPrimaryKey(Integer id) {
        return parameterMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(Parameter record, ParameterExample example) {
        return parameterMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(Parameter record, ParameterExample example) {
        return parameterMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(Parameter record) {
        return parameterMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Parameter record) {
        return parameterMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Parameter> getList() {
        ParameterExample parameterExample = new ParameterExample();
        ParameterExample.Criteria criteria = parameterExample.createCriteria();
        criteria.andIdGreaterThan(0);
        return parameterMapper.selectByExample(parameterExample);
    }
}
